package com.online_exam.service;

import com.online_exam.domain.Message;
import com.online_exam.domain.MessageUser;
import com.online_exam.viewmodel.admin.message.MessagePageRequestVM;
import com.online_exam.viewmodel.admin.message.MessageSendVM;

import java.util.List;


public interface MessageService {
    //插入发送的信息
    public int insertMessage(Message message);
    //插入接收信息的信息
    public int insertMessageUser(MessageUser messageUser);
    //接收前端的信息视图信息，实现信息的插入
    public int insertMessageByVM(MessageSendVM messageSendVM, Integer userid);

    public List<Message> select(MessagePageRequestVM vm);

    public List<MessageUser> selectByMsgId(List<Integer> ids);

    public List<MessageUser> selectByUserId(Integer id);

    public List<Message> selectByUserMsgId(List<Integer> ids);

    public void readByUser(Integer id);

    public int unReadCount(Integer userId);

}
